home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / editors / emcs1857 / 1857el~1.zoo / lisp / iso-chars.elc < prev    next >
Encoding:
Text File  |  1992-02-04  |  4.6 KB  |  44 lines

  1.  
  2. (require (quote char-table))
  3.  
  4. (defvar iso8859-char-table nil "\
  5. Char table for showing ISO 8859 characters on ISO 8859 terminals.
  6. This displays the control characters in the range [0,31] as ^X, control
  7. characters in the range [128,159] as \\nnn, the DEL character as ^? and
  8. all other characters are displayed directly.")
  9.  
  10. (defvar iso8859-1-ascii-char-table nil "\
  11. Char table for showing ISO 8859-1 characters on ASCII terminals.")
  12.  
  13. (defvar iso8859-1-ascii-oneglyf-char-table nil "\
  14. Char table for showing ISO 8859-1 characters on ASCII terminals, using
  15. one glyf per character.")
  16.  
  17. (defvar iso8859-1-swascii-char-table nil "\
  18. Char table for showing ISO 8859-1 characters on \"swascii\" terminals,
  19. i e terminals using the Swedish variant of ISO 646.")
  20.  
  21. (defvar iso8859-1-swascii-oneglyf-char-table nil "\
  22. Char table for showing ISO 8859-1 characters on \"swascii\" terminals,
  23. using one glyf per character.")
  24.  
  25. (setq iso8859-char-table (copy-char-table default-buffer-char-table))
  26.  
  27. (let ((ch 0)) (while (<= ch 31) (if (not (or (= ch 9) (= ch 10))) (put-char-table-dispr iso8859-char-table ch (string-to-rope (format "^%c" (+ ch 64))))) (setq ch (1+ ch))) (while (<= ch 126) (put-char-table-dispr iso8859-char-table ch (string-to-rope (char-to-string ch))) (setq ch (1+ ch))) (put-char-table-dispr iso8859-char-table 127 (string-to-rope "^?")) (setq ch 128) (while (<= ch 159) (put-char-table-dispr iso8859-char-table ch (string-to-rope (format "\\%3o" ch))) (setq ch (1+ ch))) (while (<= ch 255) (put-char-table-dispr iso8859-char-table ch (string-to-rope (char-to-string ch))) (setq ch (1+ ch))))
  28.  
  29. (setq iso8859-1-ascii-char-table (copy-char-table iso8859-char-table))
  30.  
  31. (mapcar (quote (lambda (pair) (put-char-table-dispr iso8859-1-ascii-char-table (car pair) (string-to-rope (car (cdr pair)))))) (quote ((160 " ") (161 "!") (162 "c") (163 "GBP") (164 "$") (165 "JPY") (166 "|") (167 "$)") (168 "\"") (169 "(c)") (170 "_a") (171 "<<") (172 "!") (173 "-") (174 "(R)") (175 "=") (176 "^o") (177 "+-") (178 "^2") (179 "^3") (180 "'") (181 "u") (182 "$)") (183 "*") (184 ",") (185 "^1") (186 "_o") (187 ">>") (188 " 1/4") (189 " 1/2") (190 " 3/4") (191 "?") (192 "A`") (193 "A'") (194 "A^") (195 "A~") (196 "A\"") (197 "AA") (198 "AE") (199 "C,") (200 "E`") (201 "E'") (202 "E^") (203 "E\"") (204 "I`") (205 "I'") (206 "I^") (207 "I\"") (208 "D-") (209 "N~") (210 "O`") (211 "O'") (212 "O^") (213 "O~") (214 "O\"") (215 "*") (216 "O/") (217 "U`") (218 "U'") (219 "U^") (220 "U\"") (221 "Y'") (222 "Th") (223 "ss") (224 "a`") (225 "a'") (226 "a^") (227 "a~") (228 "a\"") (229 "aa") (230 "ae") (231 "c,") (232 "e`") (233 "e'") (234 "e^") (235 "e\"") (236 "i`") (237 "i'") (238 "i^") (239 "i\"") (240 "d-") (241 "n~") (242 "o`") (243 "o'") (244 "o^") (245 "o~") (246 "o\"") (247 "-:") (248 "o/") (249 "u`") (250 "u'") (251 "u^") (252 "u\"") (253 "y'") (254 "th") (255 "y\""))))
  32.  
  33. (setq iso8859-1-ascii-oneglyf-char-table (copy-char-table iso8859-char-table))
  34.  
  35. (mapcar (quote (lambda (pair) (put-char-table-dispr iso8859-1-ascii-oneglyf-char-table (car pair) (string-to-rope (car (cdr pair)))))) (quote ((160 " ") (161 "!") (162 "c") (163 "#") (164 "$") (165 "Y") (166 "|") (167 "$") (168 "\"") (169 "c") (170 "+") (171 "?") (172 "!") (173 "-") (174 "R") (175 "~") (176 "C") (177 "+") (178 "2") (179 "3") (180 "'") (181 "u") (182 "$") (183 "-") (184 ",") (185 "1") (186 "0") (187 "?") (188 "?") (189 "?") (190 "?") (191 "?") (192 "A") (193 "A") (194 "A") (195 "A") (196 "A") (197 "A") (198 "A") (199 "C") (200 "E") (201 "E") (202 "E") (203 "E") (204 "I") (205 "I") (206 "I") (207 "I") (208 "D") (209 "N") (210 "O") (211 "O") (212 "O") (213 "O") (214 "O") (215 "*") (216 "O") (217 "U") (218 "U") (219 "U") (220 "U") (221 "Y") (222 "T") (223 "B") (224 "a") (225 "a") (226 "a") (227 "a") (228 "a") (229 "a") (230 "a") (231 "c") (232 "e") (233 "e") (234 "e") (235 "e") (236 "i") (237 "i") (238 "i") (239 "i") (240 "d") (241 "n") (242 "o") (243 "o") (244 "o") (245 "o") (246 "o") (247 "/") (248 "o") (249 "u") (250 "u") (251 "u") (252 "u") (253 "y") (254 "t") (255 "y"))))
  36.  
  37. (setq iso8859-1-swascii-char-table (copy-char-table iso8859-1-ascii-char-table))
  38.  
  39. (mapcar (quote (lambda (pair) (put-char-table-dispr iso8859-1-swascii-char-table (car pair) (string-to-rope (car (cdr pair)))))) (quote ((196 "[") (197 "]") (201 "@") (214 "\\") (220 "^") (228 "{") (229 "}") (233 "`") (246 "|") (252 "~"))))
  40.  
  41. (setq iso8859-1-swascii-oneglyf-char-table (copy-char-table iso8859-1-ascii-oneglyf-char-table))
  42.  
  43. (mapcar (quote (lambda (pair) (put-char-table-dispr iso8859-1-swascii-oneglyf-char-table (car pair) (string-to-rope (car (cdr pair)))))) (quote ((196 "[") (197 "]") (201 "@") (214 "\\") (220 "^") (228 "{") (229 "}") (233 "`") (246 "|") (252 "~"))))
  44.